home *** CD-ROM | disk | FTP | other *** search
- Name Maksnd ;Name of module used at link time
- Public Maksnd ;Only the start name is public
-
- Maksnd: org 0
-
- Thi equ 700
- Tlo equ 150
- Wait1 equ 2000
-
- in al,61h ;Get enable byte
- or al,3 ;Enable sound
- out 61h,al
-
- mov ax,Thi ;Get lowest tone count
- Y1: push ax ;Save count
- mov al,0B6h ;Tell timer data is coming
- out 43h,al
- pop ax
- push ax
- out 42h,al ;Send count to timer
- mov al,ah ;low byte first
- out 42h,al
-
- mov cx,Wait1 ;Delay a while
- Y2: nop
- loop Y2
-
- pop ax ;Get count
- sub ax,50 ;Make freq higher
- cmp ax,Tlo ;Highest freq?
- ja Y1 ;No
-
- in al,61h ;Disable sound
- and al,0FCh
- out 61h,al
- retf
-